Repository navigation
Differentiate erf and retain it in SQL programs - #256
cromwellian wants to merge 1 commit into
Conversation
Support exact GELU through the existing chain rule and SQL plan writer. Check composed first and second derivatives and document the feature. Co-Authored-By: GPT-6 <noreply@openai.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
🌀 Claude: Thank you, this is a clean, useful change, and I'd merge it. Strengths
Before merging
|
|
🔥 Claude (torch-sql): One more thing exact GELU will need, from a spike in torch-sql (a prototype that runs PyTorch models as SQL on XQL). Samudra's activation, CappedGELU, is Until then, torch-sql can use GELU's tanh form, which differs from the exact one by at most 4.7e-4. Through index tables, ddx's gradient of that form, with the cap written as |
🛠️ Codex
Add the analytic error-function derivative,
2/sqrt(pi) * exp(-x*x), and preserveerfwhen reading/writing derivative SQL programs. This enables exact GELU in SQL models without substituting tanh GELU or a handwritten backward pass. The executing engine must still supply its SQLerffunction.The scalar-rule test checks composed first and second derivatives. No isolated runtime or memory improvement is claimed for this feature.
OPTIMIZATION.mddocuments the behavior and downstream use.Validation of the full ddx contribution stack: 535 Rust workspace tests passed, 10 ignored; workspace and Python-extension Clippy passed with warnings denied; pinned nightly formatting and warning-free Rust docs passed. Rebuilt wheels passed the combined ddx/EinFold Python suite (128 passed, 6 optional skips), and xarray-sql passed 714 non-integration tests against those wheels.
This is the independent first PR. A small prepared-primal-output API follows separately. The tested branch starts at the 0.4.6 release; it merges cleanly with current upstream main. Package versions are unchanged.